<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>新增</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
<link rel="stylesheet" href="/css/font.css">
<link rel="stylesheet" href="/css/index.css">
<script type="text/javascript" src="/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="/js/index.js"></script>
<script type="text/javascript" src="/js/jquery.min.js"></script>
<script type="text/javascript" src="/js/layui-post.js"></script>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form action="" method="post" class="layui-form layui-form-pane">
            <div class="layui-form-item">
                <label for="moduleName" class="layui-form-label"><span class="x-red">* </span>模块名称</label>
                <div class="layui-input-block">
                    <input type="text" id="moduleName" name="moduleName" required="" lay-verify="required" placeholder="请输入模块名称" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="moduleIcon" class="layui-form-label"><span class="x-red">* </span>模块图标</label>
                <div class="layui-input-block">
                    <input type="text" id="moduleIcon" name="moduleIcon" value="/images/module-icon/3.png" required="" lay-verify="required" placeholder="请输入模块图标" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="moduleUrl" class="layui-form-label"><span class="x-red">* </span>模块链接</label>
                <div class="layui-input-block">
                    <input type="text" id="moduleUrl" name="moduleUrl" value="onsale_0.html" required="" lay-verify="required" placeholder="请输入模块链接" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="moduleSort" class="layui-form-label"><span class="x-red">* </span>模块排序</label>
                <div class="layui-input-block">
                    <input type="number" id="moduleSort" name="moduleSort" required="" lay-verify="required" placeholder="请输入模块排序" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label for="moduleType" class="layui-form-label"><span class="x-red">* </span>模块类型</label>
                <div class="layui-input-block">
                    <input type="number" id="moduleType" name="moduleType" required="" lay-verify="required" placeholder="请输入模块类型" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
            <button class="layui-btn" lay-submit="" lay-filter="add">确定</button>
          </div>
        </form>
    </div>
</div>
<script>
layui.use(['form','laydate'], function(){
   	$ = layui.jquery;
   	var form = layui.form;
   	//监听提交
   	form.on('submit(add)', function(data){
   		layuiPost('/front/cateringModule/insert?token='+sessionStorage.getItem("token"),data.field,parent.layer.getFrameIndex(window.name));
     	return false;
   	});
});
</script>
</body>

</html>